package com.sikaryofficial.system.api;

import com.sikaryofficial.common.core.domain.R;
import com.sikaryofficial.system.api.config.HiSMKDigClientConfiguration;
import com.sikaryofficial.system.api.domain.customer.RegisterChannelBodyBO;
import com.sikaryofficial.system.api.domain.order.OrderHeaderVO;
import com.sikaryofficial.system.api.factory.HiSMKDigDataFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * @author : wuweihong
 * @desc : 外网调用内网接口
 * @date : 2024-11-05
 */

@FeignClient(name = "hiSMKDigDataService", url = "${server-url.hismk-dig-api-data}", fallbackFactory = HiSMKDigDataFallbackFactory.class, configuration = HiSMKDigClientConfiguration.class)
public interface RemoteHiSMKDigDataService {

	/**
	 * 同步订单至内网
	 * @param orderHeaderVOs
	 * @return
	 */
	@PostMapping("/order/syncOrder")
	R<Boolean> syncOrder(@RequestBody List<OrderHeaderVO> orderHeaderVOs);

	/**
	 * 同步客户信息至内网
	 * @param channelBody
	 * @return
	 */
	@PostMapping("/customer/registerSync")
	R<Boolean> syncChannelUser(@RequestBody RegisterChannelBodyBO channelBody);

}
